<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>赋值运算</title>
  </head>
  <body>
    <!-- 
    =
    +=
    -=
    *=
    /=
    %=
     -->
    <script>
      //  var a = 12
      //   a = a + 1; //a无耻自加1
      //  a += 1 //a无耻自加1
      //  console.log(a);

    //   var a = 12
    //   a -= 2
    //   console.log(a);//10

    //   var a = 12
    //   a *= 2
    //   console.log(a);//24

    //   var a = 12
    //   a /= 2
    //   console.log(a);//6

      var a = 12
    //   a = a % 5
      a %= 5
      console.log(a);//2
    </script>
  </body>
</html>
